<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  props: {
    isActive: Boolean,
    text: String,
  },
});
</script>

<template>
  <view class="type-item">
    <template v-if="isActive">
      <view class="type-item-active">{{ text }}</view>
      <view class="type-item-line"></view>
    </template>
    <view class="type-item-text" v-else>{{ text }}</view>
  </view>
</template>

<style lang="scss">
.type-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 56rpx;

  .type-item-text {
    margin-bottom: 6rpx;
    font-size: 30rpx;
    color: #888888;
    line-height: 42rpx;
  }

  .type-item-active {
    font-size: 34rpx;
    color: #2d2d2d;
    line-height: 48rpx;
    font-weight: bold;
  }

  .type-item-line {
    width: 40rpx;
    height: 8rpx;
    border-radius: 200rpx 0;
    background: linear-gradient(270deg, #ff8700 0%, #ff9d48 100%);
  }
}
</style>